home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / term / vltj5867.lha / VLT / rexx / VLTPhoneSelect.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-27  |  1KB  |  61 lines

  1. /** VLTPhoneSelect.rexx
  2. *
  3. *   Select the entries to be dialed this time around
  4. *
  5. *   By W.G.J. Langeveld, February 1992.
  6. *
  7. **/
  8. /*
  9. *   Add libraries if necessary
  10. */
  11. if show("l", "rexxarplib.library") = 0 then do
  12.    check = addlib('rexxsupport.library', 0, -30, 0)
  13.    check = addlib('rexxarplib.library',  0, -30, 0)
  14. end
  15. /*
  16. *   Get VLT port and screen names and size
  17. */
  18. vltport = address()
  19. cols = ScreenCols(vltport)
  20. if cols == -1 then do
  21.    vltscreen = ""
  22.    cols = ScreenCols()
  23.    rows = ScreenRows()
  24. end
  25. else do
  26.    vltscreen = vltport
  27.    rows = ScreenRows(vltscreen)
  28. end
  29. /*
  30. *   Check if we're set up right
  31. */
  32. call pragma('W','NULL')
  33.  
  34. if ~exists("VLTPhoneBook:") then do
  35.    "@VLTPhoneSetup.rexx"
  36.    exit
  37. end
  38. /*
  39. *   Use a multiple select file requester. This works only under 2.0
  40. */
  41. test = GetFile(80, 50,"VLTPhoneBook:",, "Select Numbers to Dial",    ,
  42.                vltscreen, "MULTISELECT", files)
  43. if test = "" then exit
  44.  
  45. if files.0 = 0 then do
  46.    "message (You didn't select any files!); delay 1.5; message)"
  47. end
  48. /*
  49. *   Write the entries to the dial file
  50. */
  51. if open(output, "VLTPhoneBook:T/dial_file", "w") = 0 then do
  52.    "message (Couldn't write dial file); delay 1.5; message"
  53.    exit
  54. end
  55. do i = 1 to files.0
  56.    writeln(output, files.i)
  57. end
  58. call close(output)
  59.  
  60. exit
  61.